import Vue from 'vue'
import App from './App'
import { $http } from '@escook/request-miniprogram';

Vue.config.productionTip = false

App.mpType = 'app'

// 设置http请求的baseUrl
$http.baseUrl = 'https://www.uinav.com/api/public/v1';
// 设置http请求的拦截器
$http.beforeRequest = function() {
	uni.showLoading({
		title: "请求数据中..."
	});
};
$http.afterRequest = function() {
	uni.hideLoading();
};

uni.$baseShowMsg = function(msg, duration) {
	uni.showToast({
		title: msg || '数据请求失败',
		duration: 3000,
		icon: 'none'
	});
};

const app = new Vue({
	...App
})
app.$mount()
